library(plotly)
## Warning: package 'plotly' was built under R version 3.4.4
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 3.4.4
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout

Settings (cont.)

plot_ly(mtcars, x = mtcars$wt, y=mtcars$mpg, mode="markers", 
        type="scatter",color=as.factor(mtcars$cyl), size=mtcars$hp ) %>%   
        layout(xaxis=x, yaxis=y)

Plotting

## Warning: package 'bindrcpp' was built under R version 3.4.4
## Warning: `line.width` does not currently support multiple values.

## Warning: `line.width` does not currently support multiple values.

## Warning: `line.width` does not currently support multiple values.